home *** CD-ROM | disk | FTP | other *** search
- Path: news.nstn.ca!news
- From: keichele@ac.dal.ca (Klaus Eichele)
- Newsgroups: comp.lang.c
- Subject: Re: Question on argv
- Date: Thu, 01 Feb 1996 04:08:54 GMT
- Organization: Dalhousie University
- Message-ID: <4ep0c2$du6@news.nstn.ca>
- References: <4eoq3c$45j@usenet.ucs.indiana.edu>
- NNTP-Posting-Host: rewasylishen.chem.dal.ca
- X-Newsreader: Forte Free Agent 1.0.82
-
- gompa@nickel.ucs.indiana.edu (Raghu R. Gompa) wrote:
-
- >I am writing a program in which I want to
- >retrieve the arguments argv[1] ... argv[4].
- >argv[1] .. argv[3] are strings of characters.
- >I want to use argv[4] as an integer. Can
- >I do that? and how? Thank you for your
- >help in advance. .. Raghu
-
- Hi,
- just use one of the string_to_integer conversion functions
- (e.g., sscanf, atoi) and assign the result to your integer
- variable.
-
- Cheers,
- Klaus
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Klaus Eichele keichele@ac.dal.ca
- http://ac.dal.ca/~keichele/keichele.html
-
-